import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../views/Home.vue';

Vue.use(VueRouter);

const routes = [
	{
		path: '/',
		redirect: '/Home'
	},
	{
		path: '/Home',
		name: 'Home',
		component: Home
	},
	{
		path: '/Users',
		name: 'Users',
		component: () => import(/* webpackChunkName: "Users" */ '../views/Users.vue')
	},
	{
		path: '/Shop',
		name: 'Shop',
		component: () => import(/* webpackChunkName: "Shop" */ '../views/Shop.vue')
	},
	{
		path: '/Order',
		name: 'Order',
		component: () => import(/* webpackChunkName: "Order" */ '../views/Order.vue')
	},
	{
		path: '/finance',
		name: 'finance',
		component: () => import(/* webpackChunkName: "finance" */ '../views/finance.vue')
	},
	{
		path: '/Detail/:id',
		name: 'Detail',
		component: () => import(/* webpackChunkName: "Detail" */ '../views/Detail.vue')
	}
]

const router = new VueRouter({
	mode: 'history',
	base: process.env.BASE_URL,
	routes
});

export default router;
